home *** CD-ROM | disk | FTP | other *** search
/ All for Cell Phones: Sony Ericsson / Sony-Ericsson 2004.iso / Java / Foot / Football.jar / Game.class (.txt) < prev    next >
Encoding:
Java Class File  |  2002-05-30  |  1.8 KB  |  62 lines

  1. import javax.microedition.lcdui.Display;
  2. import javax.microedition.lcdui.Form;
  3. import javax.microedition.lcdui.Image;
  4. import javax.microedition.midlet.MIDlet;
  5.  
  6. public class Game extends MIDlet {
  7.    public Display display;
  8.    public static int width;
  9.    public static int height;
  10.    public static int fontHeight;
  11.    public static byte[] buffLevel;
  12.  
  13.    public void destroyApp(boolean var1) {
  14.    }
  15.  
  16.    public void exit() {
  17.       this.destroyApp(false);
  18.       ((MIDlet)this).notifyDestroyed();
  19.    }
  20.  
  21.    public static void loadImages() {
  22.       try {
  23.          d.int[0] = Image.createImage("/intro.png");
  24.          d.int[1] = Image.createImage("/gol.png");
  25.          d.int[2] = Image.createImage("/ball2.png");
  26.          d.int[3] = Image.createImage("/ball3.png");
  27.          d.int[4] = Image.createImage("/gol_g1.png");
  28.          d.int[5] = Image.createImage("/gol_g2.png");
  29.          d.int[6] = Image.createImage("/extra.png");
  30.       } catch (Exception var1) {
  31.          ((Throwable)var1).printStackTrace();
  32.       }
  33.  
  34.    }
  35.  
  36.    public void pauseApp() {
  37.    }
  38.  
  39.    public void startApp() {
  40.       b var1 = new b(this, (d)null, (byte)0);
  41.       this.display = Display.getDisplay(this);
  42.       String var2 = System.getProperty("microedition.platform");
  43.       if (var2 == null || !var2.startsWith("SL45") && !var2.startsWith("SL42")) {
  44.          Form var3 = new Form("Error");
  45.          var3.append("Error starting game!");
  46.          this.display = Display.getDisplay(this);
  47.          this.display.setCurrent(var3);
  48.  
  49.          try {
  50.             Thread.sleep(2000L);
  51.          } catch (Exception var4) {
  52.          }
  53.  
  54.          this.exit();
  55.       } else {
  56.          this.display = Display.getDisplay(this);
  57.          this.display.setCurrent(var1);
  58.       }
  59.  
  60.    }
  61. }
  62.